package com.lank.gateway.exception;

import com.lank.boot.result.exception.BusinessException;
import com.lank.gateway.enums.GatewayBusinessEnum;
import lombok.Getter;

/**
 * @author Administrator
 */
@Getter
public class GatewayBusinessException extends BusinessException {

    private final int code;
    private final boolean isShowMsg = true;

    /**
     * 使用枚举传参
     *
     * @param businessEnum 异常枚举
     */
    public GatewayBusinessException(GatewayBusinessEnum businessEnum) {
        super(businessEnum.getCode(), businessEnum.getMessage());
        this.code = businessEnum.getCode();
    }

}
